{% extends "base.html" %}
{% block title %}妖孽{% endblock %}
{% block content %}
            <div>tag:{{ tag.name }}</div>
  <!-- post -->
  {% for post in posts %}
  <div id="post-{{ post.id }}" class="hentry post post-1 odd author-admin category-web-develpment post_tag-flash post_tag-flash clear-block">

        <h2 class="title"><a href="/post/{{ post.id }}" rel="bookmark" title="{{ post.title }}">{{ post.title }}</a></h2>
   
        <div class="post-date">
       <p class="day">{{ post.created }}</p>
     </div>

     <div class="post-info clear-block ">
      <p class="author alignleft">由<a href="#" title="will ">{{ post.user }}</a>发表在<a href="#">{{ post.area }}</a>                  </p>
            <p class="comments alignright">
              {% ifequal post.comment_set.count 0 %}
                <a href="#" class="no comments">没有评论</a>
              {% else %}
                <a href='#' class="comments">{{ post.comment_set.count }}个评论 </a>
              {% endifequal %}
              
            </p>
           </div>
    
        <div class="post-content clear-block">
      <p> {{ post.body }}</p>
     </div>
       <div class="post-tags">
    {% for tag1 in post.tag_set.all%}
    <a href="/tag/{{tag1.name}}" rel="tag"> {{ tag1.name }} </a>{% if not forloop.last %}, {%endif%} 
    {% endfor %}
    </div>
  </div>
  {% endfor %}
{% endblock %}